package com.fan.springboot1903fanjianghao.controller;

import com.fan.springboot1903fanjianghao.service.impl.UserServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;

/**
 * ZixiaFan
 * 2021/11/15 12:46
 */
@Controller
public class indexController {

    @Autowired
    UserServiceImpl userService;

    /**
     * 欢迎页面
     * @return
     */
    @GetMapping(value = {"/","/index"})
    public String loginPage(){
        return "index";
    }

    /**
     * 去登录页面
     * @return
     */
    @GetMapping(value = {"/toLogin","login.html"})
    public  String toLogin(){
        return "user/login";
    }

    /**
     * 去主页面
     * @return
     */
    @GetMapping(value = {"main.html","main"})
    public String toMain(){
        return "index";
    }

    /**
     * 去注册页面
     * @return
     */
    @GetMapping(value = {"register.html","register"})
    public String toRegister(){
        return "user/register";
    }

    /**
     * 去用户主页
     * @return
     */
    @GetMapping(value = {"toUserHome"})
    public String toUserHome(){
        return "user/userHome";
    }

    /**
     * 去主页模板
     */
    @GetMapping(value = {"/toMode"})
    public String toMode(){
        return "user/index";
    }
}
